import {
	STOREAGE
} from "@/config/app.js"

/**
 * 接口验证
 */
export const checkLogin = () => {
	let token = uni.getStorageSync(STOREAGE.TOKEN)
	if (!token) {
		return false
	} else {
		return true
	}
}

/**
 * 页面验证
 */
export const checkPage = () => {
	let token = uni.getStorageSync(STOREAGE.TOKEN)
	if (!token) {
		uni.navigateTo({
			url: '/pages/login/login'
		})
	}
}